{{extend 'layout.html'}}
<script>
function checkall() { jQuery('input[type="checkbox"]').attr('checked',true) }
function uncheck() { jQuery('input[type="checkbox"]').attr('checked',false) }
</script>

<h1>Gauge Configuration File "{{=configfile.filename}}"</h1>

Created by {{=configfile.posted_by.first_name}} {{=configfile.posted_by.last_name}} on {{=configfile.posted_on}}
[{{if configfile.local:}}<a href="file:{{=configfile.file}}">{{else:}}<a href="{{=URL(r=request,f='download',args=configfile.file)}}"{{pass}}>download</a> |
<a href="{{=URL(r=request,f='download',args=configfile.converted_file)}}">download (in mdp format)</a>]<br/>

Format:{{=configfile.format}}, Size: {{=configfile.lattice_size}}, Precision: {{=configfile.precision}}, Endianess: {{=configfile.endianness}}<br/>
Part of stream {{=A(configfile.stream.name,_href=URL(r=request,f='stream',args=configfile.stream))}}<br/>

{{=WIKI(configfile.stream.description)}}
<br/>
<br/>

<center>
  <table>
    <tr>
      <td  style="text-align:center">
    <h2>New processing</h2>
    {{if form:}}
    {{=form}}
    {{else:}}
    {{=SPAN(login,' to submit new processing job')}}
    {{pass}}
      </td>
      <td style="vertical-align: top; padding-top:40px">
    <img src="{{=URL(r=request,c='static',f='images/arrow.png')}}" width="50px" height="50px"/>
      </td>
      <td  style="text-align:center">
    <h2>Completed and In-Progree Processing</h2>
    <form>
{{=plugin_jqgrid(db.processedfile,fieldname='configfile',fieldvalue=configfile.id,columns=('id','status','algorithm'),col_width=120,width=350)}}
      {{if auth.user:}}
      <input name="CheckAll" value = "Check all" onclick="checkall()" type="button">
      <input name="CheckAll" value = "Uncheck all" onclick="uncheck()" type="button">
      <input value="Delete" type="submit">
      {{pass}}
    </form>
    </td></tr>
  </table>
</center>
